<#import "../baseftl/baseftl.ftl" as comm />
<html>
  <head>
    <title>news.ftl</title>
  </head>
  <body>
    <table class="listView">
		<tr>
			<th><a href="${base}/demo/news.shtml?page.orderBy=title&page.order=
			<#if page.orderBy=="title">${page.inverseOrder}<#else>desc</#if>
			"><b>标题</b></a></th>
			<th><b>作者</b></a></th>
			<th><a href="${base}/demo/news.shtml?page.orderBy=date&page.order=
			<#if page.orderBy=="date">${page.inverseOrder}<#else>desc</#if>
			"><b>发布日期</b></a></th>
			<th><b>照片</b></th>
			<th><b>操作</b></th>
		</tr>
	
	<#list page.result as list>
    	<tr>
				<td nowrap="nowrap">${list.title?default("")}&nbsp;</td>
				<td nowrap="nowrap">${list.auth?default("")}&nbsp;</td>
				<td nowrap="nowrap">${list.date?default("")}&nbsp;</td>
				<td><img src="${base}/upload/${list.picture?default("")}" alt="${base}/upload/${list.picture?default("")}" width="64" height="56"/>&nbsp;</td>
				<td nowrap="nowrap">&nbsp;
					<a href="news/delete/${list.id?default("")}.shtml">删除</a>&nbsp;
				</td>
		</tr>
    </#list>
	</table>
	<@comm.pages url="news.shtml"/><a href="news/input.shtml">增加新闻</a>
	<a href="${base}/parser/parsernews.shtml">抓取新闻</a>
  </body>
</html>
